<template>
    <div id="zhoukao" >
        <!-- <div>  此处div里面不能用v-for,否则将会一起循环每一行 -->
            <p>手机号：<input type="text" v-model="phone"   v-if="i=1" :style="{'background':'red'}"></p>
            <p>邮  箱：<input type="text" v-model="email"   v-if="i=2" :style="{'background':'yellow'}"></p>
            <p>密  码：<input type="text" v-model="password"  v-if="i=3" :style="{'background':'blue'}"></p>
             <input type="button"  value="注册" @click="reg()">
        <!-- </div> -->
        
    </div>
</template>
<script>
import axios from "axios"
import {zhoukao_reg} from "./axios_api/api"
export default {
    name:"zhoukao",
    data() {
        return {
           phone:"",
           email:"",
           password:"", 
           i:[1,2,3]
        }
    },methods:{
        reg(){
              var data ={
                  "phone":this.phone,
                  "email":this.email,
                  "password":this.password,

              }
              zhoukao_reg(data).then(res=>{
                  console.log(res)
              })
    }
  }
}
</script>'
<style>
     
</style>
